package cn.com.simple.learning.designpattern.create.abstractfactory;


/**
 * @author Jianxing.Jia
 * @date 2022/2/7
 * @description 描述信息
 */
public class AbstractFactoryTest {

    public static void main(String[] args) {

        ProducerFactory producerFactory = new ProducerFactory();
        AbstractFactory brand = producerFactory.getFactory("brand");
        Vehicle bwm = brand.getVehicle("bmw");
        bwm.run();

        Vehicle benz = brand.getVehicle("benz");
        benz.run();

        AbstractFactory other = producerFactory.getFactory("other");
        Vehicle car = other.getVehicle("car");
        car.run();

    }

}
